<template>
  <div id="app">
     <!-- <transition :name="aniType"> -->
    <keep-alive>
      <router-view/>
    </keep-alive>
    <!-- </transition> -->
  </div>
</template>

<script>
export default {
  data:function(){
    return{
      aniType: "",
    }
  },
  watch: {
    $route: function(n, o) {
      var nDeep = n.path.split("/").length - 1;
      var oDeep = o.path.split("/").length - 1;
      if (nDeep > oDeep) {
        this.aniType = "pagein";
      } else if (nDeep < oDeep) {
        this.aniType = "pageout";
      } else {
        this.aniType = "";
      }

    },

  },
}
</script>

<style>

</style>
